<template>
  <div>
    <div>
      <span>姓名：</span>
      <el-input v-model="something"></el-input>
    </div>
    <div class="footer-wrap">
      <el-button type="primary" @click="handleOk">提交</el-button>
      <el-button @click="handleClose">算了</el-button>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { Modal } from "leisure-lib";

const props = withDefaults(
  defineProps<{
    modal?: {
      close: Function;
    };
    done: Function;
  }>(),
  {}
);
const something = ref();
const handleOk = () => {
  props.done("提交success");
  props.modal.close();
};
const handleClose = () => {
  console.log(props.modal.close());
};
</script>

<style scoped></style>
